[Bugfix] #526, #151 small fix