Fix return detecting