Fixing compilation bugs