Additional fixes to the previous commit