Some ugly code :]