Just hacking something ugly to get it work