Reverted fix for #34, needs to be properly tested before pushing