Fixed various bugs partly concerning the properties dialog