bugfixing for 4.1.3 release

code cleanup