Fixed parsing error and added init image option