Fixed some ST flags and compiler warnings