some errors fixed related to previous commit