Fixing problem with 5.3 compatibility (wrong context for $this)