Solves bug in last commit.