Fixes for older PHP