Apply fixes as suggested