Attempt at error fix