fixed redirect error
fixed serving of attachments