Removed useless code, added ignore check