The present invention provides compounds of the general formula (I) wherein X, n and R1 are as described herein, as well as pharmaceutically acceptable salts and esters thereof, methods for their manufacture, pharmaceutical compositions containing them and their use as medicaments. The active compounds of the present invention are dual modulators of the serotonin 5-HT2a and dopamine D3 receptors, useful in the treatment and/or the prevention of cognitive disorders, drug addiction, depression, anxiety, drug dependence, dementias, memory impairment, psychotic disorders comprising schizophrenia, schizoaffective disorders, bipolar disease, mania, psychotic depression, and psychoses comprising paranoia and delusions.