Small changes to prevent PHP errors