Some additional fixes for last commit