Serious bug fixed

to be reviewed