Fancy reflection stuff. Seems to work ^_^