Major and minor bug rectifications