fix Atif's previous crash bug