Fixed a bug caused by moving windows to the next monitor when they were not the last window in the array