fixes for building gem