fixed caught and incomplete bug