fixes #19 with light sql modifications