Fixed an infinite recursion issue (thanks MichaelBanks)