Slighty cleaner, same hack
non-hacky version