fixed bad check behaviour