add in a fix for issue #32 from @Aodrulez. Been testing this for a while and it looks good, thanks\!