fixed check for custom method bombing out due to different exception on windows