3.1

Various bug fixed