Fix bug caused by following incorrect lecture notes!