Fix: add missing $app and changes $this variables

This fixes travis's fatal error with php 5.3
Fix: was expecting an array, so give it an array