Fixed errors (thanks Thibaud!)