Improved ST3 compatibility and error handling