api fixes for sky3 and php5.4 strict