Work on some potential bugs