Fixed findById to return error if not found