Fixed 2 issues

#308 and #204