#272 Added contents encoding + fixed scripts bug