fix ratio? function bug