Fixed bugs introduced from code consistency fix
Merge remote-tracking branch 'origin/master'