Adding some minor code for improving checks