Fixing bugs in normal prediction