Fixed bug where drag/drop would sometimes not work