Proper fix... not pretty, but at least it works -_-