fixed #25; fixed #27; fixed #28