fixed an issue that popped up in StackOverflow, thanks @klueless