Fixes for issues with P33 C code