fix half function result