Fixed issue with invalid type on different platforms.