fixed first click bug