Fixing the return boolean value issue