Patch by Andreas Ntakas <freedatanow@yahoo.com>: