Fixed up, works sort of