Fixed API fpc nullpointer