Some fixes for milestone 3