Fixing job period lookup bug