Fixes bug in last commit