fixed check_collision