Fixed error when counting used space in course and in front page