fixes for gcc compat