fix braindead code