Fix return-type mismatch issue