fixed get bad ghost function