Fixing the bugs that Gabriel was seeing