minor function fix