Fixing stupid bugs introduced by last commit