Fixing a KeyError when using the scaling code

Simple KeyError, but I added a test for it as well. Wondering about the start/end times though...