Fixes #19, Had diffrent idea initially but that is not safe to implement