fixed a couple of blocking bugs, works ok now