ece's bug fixes