Changed setters and bug fixes