Fix issues caused by updated code