Minor function fix