Fixed programming errors