compile fixes for gcc