Fixed error issues