Fixes for php warns