make module more robust