Fixed issues

Fixed an issue with two StudyFrames opening at once
Fixed an issue with the program crashing when the number of images
	was not divisible by 4 (oddly specific, I know)