Fixed func balance logic