Added few checks