Fixed incorrect range of return value