Fix for invalid selfref - http://stackoverflow.com/q/24471276/559784