cleanup for Issue#2 and Issue#23