Sorted fix

fixes issues pointed out @rixner

sorry about this.