fixing some bug