Fixes for ICPC compatibility