Fixed compatability issues with ST3

Thank you to @duderman for code contribution