Merging in @skie's work

@ravage84 want to be awesome and confirm his fixes work for me? If so I will go ahead and merge this in.