Updated fixes from previous commit