Fixed some minore bugs keeping windows from working