fixs some bug issues