Fixed stupid function shit