Bug fixes for issues #14 and #15, warnings elimination