Fix bug in singlesp env