Feature request from @securitygen and bugfix from @nitr0usmx