Fix wrong type of return value