Fixed 10 issues

#538, #542, #549, #573, #581, #590, #653, #681, #782, #904