Fixes an important bug