fix things that worked in php 5.4 but not 5.5