fixed http://codequake.de/forum/index.php/Thread/1556-Undefined-index-attachment/