Fixed runtime errors and bad types