Fixed some stupid code