Code Changes for bug fixes