fixed the bug reported by OmniaZayed