Fix return statement to return the correct values.