Minor bug fix and upgrade dependencies