Bug fix from last commit