check function fix