fixing the buggy code of hoolan