Mede some minor fixes