fixed programming errors