fixed some logic broken by last commit