Fixed issues:

#313
#329