Filling in some bugs