Bug fixes and attachments. Fix #1

Signed-off-by: Adrian Espinosa <aespinosamoreno@gmail.com>